using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for VPPPayment
/// </summary>
public class VPPPayment : IBusinessEntity
{


    private int _deliverableID;
    private string _fullName; //FullName of customer
    private decimal _amountToCollect;
    private decimal _charge;
    private bool _isCustomerPaid;


    public VPPPayment()
    {
        _fullName = "";
    }

    public bool IsCustomerPaid
    {
        get { return _isCustomerPaid; }
        set { _isCustomerPaid = value; }
    }

    public decimal Charge
    {
        get { return _charge; }
        set { _charge = value; }
    }

    public decimal AmountToCollect
    {
        get { return _amountToCollect; }
        set { _amountToCollect = value; }
    }

    public string FullName
    {
        get { return _fullName; }
        set { _fullName = value; }
    }

    public int DeliverableID
    {
        get { return _deliverableID; }
        set { _deliverableID = value; }
    }



    #region IBusinessEntity Members

    public void Fill(System.Data.SqlClient.SqlDataReader reader)
    {
        DeliverableID = reader.GetInt32(reader.GetOrdinal("DeliverableID"));
        if (DAL.ColumnExists(reader, "FullName"))
            FullName = reader.GetString(reader.GetOrdinal("FullName"));
        if (DAL.ColumnExists(reader, "AmountToCollect"))
            AmountToCollect = reader.GetDecimal(reader.GetOrdinal("AmountToCollect"));
        if (DAL.ColumnExists(reader, "Charge"))
            Charge = reader.GetDecimal(reader.GetOrdinal("Charge"));
        if (DAL.ColumnExists(reader, "IsCustomerPaid"))
            IsCustomerPaid = reader.GetBoolean(reader.GetOrdinal("IsCustomerPaid"));
    }

    #endregion
}
